//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tools\fn_deleteWaypoints.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_grp","_i","_wp"];
_grp = _this;
if (IS_ARRAY(_this)) then {
	DEFAULT_PARAM(_grp,0,grpNull);
};

if (AND_ALSO(IS_GROUP(_grp),(!isnull _grp))) then {
	for "_i" from 0 to ((count (waypoints _grp)) - 1) step 1 do {
		deleteWaypoint [_grp, _i];
	};
	TRACE_1("Waypoints",count (waypoints _grp));
} else {
	ERROR("Invalid Parameters");
};
TRACE_1("End");
TMFPROFILERSTOP;
